//
//  MCBasicViewController.h
//  MCPublicModule
//
//  Created by Mirko on 15/12/29.
//  Copyright (c) 2015年 Mirko. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, EMCNavigationActionType)
{
    kMCNavActionLeftAreaLeft = 1001,
    kMCNavActionLeftAreaRight,
    kMCNavActionRightAreaLeft,
    kMCNavActionRightAreaRight,
    kMCNavActionCenterTitle,
};

static NSString *const kParametesKey = @"parameter";

@class MCUIButton;

@interface MCBasicViewController : UIViewController

@property (nonatomic, strong) MCUIButton *leftAreaLBtn;
@property (nonatomic, strong) MCUIButton *leftAreaRBtn;
@property (nonatomic, strong) MCUIButton *rightAreaLBtn;
@property (nonatomic, strong) MCUIButton *rightAreaRBtn;

@property (nonatomic, strong) UIView *leftArea;
@property (nonatomic, strong) UIView *centerArea;
@property (nonatomic, strong) UIView *rightArea;

@property (nonatomic, assign) NSInteger leftAreaW;
@property (nonatomic, assign) NSInteger centerAreaW;
@property (nonatomic, assign) NSInteger rightAreaW;

@property (nonatomic, strong) MCUIButton *titleButton;

#pragma mark about tableview set up
@property (nonatomic, assign) BOOL cellLineNoSpace;

#pragma mark about param
@property (nonatomic, strong) NSMutableDictionary *parameter;


#pragma mark about UITableView load server data

@property (nonatomic, strong) IBOutlet UITableView *mcTableView;
@property (nonatomic, strong) NSMutableArray *mcTableDataSource;
@property (nonatomic, assign) NSInteger pageIdex;
@property (nonatomic, assign) NSInteger pageStep;
@property (nonatomic, assign) NSInteger currentPage;


-(void) handleNavigationAction:(EMCNavigationActionType) actionType;
-(void) handleGoBackEvent:(UIButton *) sender;

#pragma mark about param
-(BOOL) parameterIsValid;

@end

@interface MCBasicViewController (LoadIB)

+(instancetype) loadIBVCIdentifier:(NSString *) name;
+(instancetype) loadMCIBVCIdentifier:(NSString *) name;

@end
